package com.wing.sell.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.product.model.request.ProductReviewAddForm;
import com.wing.product.model.request.ProductReviewAuditForm;
import com.wing.product.model.response.ProductReviewSearchVo;
import com.wing.product.model.response.ReviewDetailVo;
import com.wing.sell.model.entity.OrderProReview;
import com.wing.sell.model.request.OrderProReviewForm;
import com.wing.sell.model.response.OrderProReviewVO;

import java.util.List;
import java.util.Map;

/**
 * 销售订单产品评审表-Service
 *
 * @author
 */
public interface OrderProReviewService extends IService<OrderProReview> {

    /**
     * 添加
     *
     * @param orderProReviewForm
     * @return
     */
    int add(OrderProReviewForm orderProReviewForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<OrderProReviewVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<OrderProReviewVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    OrderProReviewVO get4appById(Long id);

    /**
     * 查询评审任务列表 带分页
     * @param pg
     * @param params
     * @return
     */
    Page<ProductReviewSearchVo> getReviewPageBy(Page<ProductReviewSearchVo> pg, Map<String, Object> params,String processId);

    /**
     * 添加评审任务
     * @param productReviewAddForm
     * @return
     */
    int addReviewInfoBy(ProductReviewAddForm productReviewAddForm);

    /**
     * 查看详情
     * @param id
     * @return
     */
    ReviewDetailVo getReviewDetailBy(String id);

    /**
     * 审核
     * @param
     * @param
     * @param productReviewAuditForm
     * @return
     */
    JsonResult linkInfo(ProductReviewAuditForm productReviewAuditForm);

    /**
     * 查询评审记录信息
     * @param pg
     * @param params
     * @param processId
     * @return
     */
    Page<ProductReviewSearchVo> getReviewRecordPageBy(Page<ProductReviewSearchVo> pg, Map<String, Object> params, String processId);

    /**
     * 添加评审任务
     * @param productReviewAddForm
     * @return
     */
    int addReviewRecordInfoBy(ProductReviewAddForm productReviewAddForm);

    /**
     * 审核
     * @param productReviewAuditForm 审核入参
     * @return
     */
    JsonResult auditInfoBy(ProductReviewAuditForm productReviewAuditForm);
}
